package com.sq.partner.manager.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sq.partner.manager.dao.ICoreDeptDao;
import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.service.ICoreDeptService;
@Service
public class ICoreDeptServiceImpl implements ICoreDeptService {
	@Resource
	private ICoreDeptDao iCoreDeptDao;
	@Override
	public Map<String, String> queryDeptNameList(List<String> list) throws Exception {
		Map<String, Object> map=new HashMap<String, Object>();
		Map<String, String> map1=new HashMap<String, String>();

		map.put("deptNames", list);
		List<CoreDept> coreDepts=iCoreDeptDao.queryDeptNameList(map);
		
		if(coreDepts!=null&&coreDepts.size()>0){
			for (CoreDept coreDept : coreDepts) {
				map1.put(coreDept.getDeptCode(), coreDept.getDeptCname());
			}
		}
		return map1;
	}}
